package com.ds.dsm.aggregation.module;

import com.ds.dsm.aggregation.module.service.ModuleConfigService;
import com.ds.esd.custom.annotation.ComboNumberAnnotation;
import com.ds.esd.custom.annotation.CustomAnnotation;
import com.ds.esd.custom.annotation.FieldAnnotation;
import com.ds.esd.custom.bean.CustomModuleBean;
import com.ds.esd.custom.form.annotation.FormAnnotation;
import com.ds.esd.custom.form.enums.CustomFormMenu;
import com.ds.esd.custom.toolbar.BottomBarMenu;
import com.ds.esd.tool.ui.component.dialog.DialogBean;
import com.ds.esd.tool.ui.enums.ComponentType;
import com.ds.esd.tool.ui.enums.PosType;

@BottomBarMenu
@FormAnnotation(col = 1, customService = ModuleConfigService.class,  bottombarMenu = {CustomFormMenu.Save,CustomFormMenu.ReSet})
public class ModuleWinMove {


    @CustomAnnotation(hidden = true, pid = true)
    String domainId;

    @CustomAnnotation(hidden = true, pid = true)
    String sourceClassName;

    @CustomAnnotation(caption = "使用内嵌窗口")
    Boolean dio = false;

    @CustomAnnotation(caption = "是否锁定")
    Boolean locked;

    @CustomAnnotation(caption = "自动展开")
    Boolean folded;


    @CustomAnnotation(caption = "拖动大小")
    Boolean resizer;

    @CustomAnnotation(caption = "位置")
    PosType pos;

    @CustomAnnotation(caption = "最小宽度限制")
    String minWidth;
    @CustomAnnotation(caption = "最小高度限制")
    String minHeight;

    @ComboNumberAnnotation
    @CustomAnnotation(caption = "最小")
    Integer min;
    @ComboNumberAnnotation
    @CustomAnnotation(caption = "最大")
    Integer max;


    @CustomAnnotation(caption = "模式对话框")
    Boolean modal;
    @CustomAnnotation(caption = "对话框可拖动")
    Boolean movable;
    @FieldAnnotation(colSpan = -1)
    @CustomAnnotation(caption = "对话框弹出源")
    String fromRegion;

    @FieldAnnotation(rowHeight = "100", componentType = ComponentType.CodeEditor, colSpan = -1)
    @CustomAnnotation(caption = "样式")
    String cssStyle;

    public ModuleWinMove(CustomModuleBean dataBean, DialogBean dialogBean) {

        if (dialogBean != null) {
            this.dio = true;
            this.modal = dialogBean.getModal();
            this.movable = dialogBean.getMovable();
        }

        this.domainId = dataBean.getDomainId();
        this.sourceClassName = dataBean.getSourceClassName();
        this.folded = dataBean.getFolded();
        this.fromRegion = dataBean.getFromRegion();
        this.minHeight = dataBean.getMinHeight();
        this.minWidth = dataBean.getMinWidth();

    }

    public String getCssStyle() {
        return cssStyle;
    }

    public void setCssStyle(String cssStyle) {
        this.cssStyle = cssStyle;
    }

    public Boolean getDio() {
        return dio;
    }

    public void setDio(Boolean dio) {
        this.dio = dio;
    }

    public String getDomainId() {
        return domainId;
    }

    public void setDomainId(String domainId) {
        this.domainId = domainId;
    }

    public String getSourceClassName() {
        return sourceClassName;
    }

    public void setSourceClassName(String sourceClassName) {
        this.sourceClassName = sourceClassName;
    }

    public Boolean getLocked() {
        return locked;
    }

    public void setLocked(Boolean locked) {
        this.locked = locked;
    }

    public Boolean getFolded() {
        return folded;
    }

    public void setFolded(Boolean folded) {
        this.folded = folded;
    }

    public Boolean getResizer() {
        return resizer;
    }

    public void setResizer(Boolean resizer) {
        this.resizer = resizer;
    }

    public PosType getPos() {
        return pos;
    }

    public void setPos(PosType pos) {
        this.pos = pos;
    }

    public String getMinWidth() {
        return minWidth;
    }

    public void setMinWidth(String minWidth) {
        this.minWidth = minWidth;
    }

    public String getMinHeight() {
        return minHeight;
    }

    public void setMinHeight(String minHeight) {
        this.minHeight = minHeight;
    }

    public Integer getMin() {
        return min;
    }

    public void setMin(Integer min) {
        this.min = min;
    }

    public Integer getMax() {
        return max;
    }

    public void setMax(Integer max) {
        this.max = max;
    }

    public Boolean getModal() {
        return modal;
    }

    public void setModal(Boolean modal) {
        this.modal = modal;
    }

    public Boolean getMovable() {
        return movable;
    }

    public void setMovable(Boolean movable) {
        this.movable = movable;
    }

    public String getFromRegion() {
        return fromRegion;
    }

    public void setFromRegion(String fromRegion) {
        this.fromRegion = fromRegion;
    }
//
//    public String getCssStyle() {
//        return cssStyle;
//    }
//
//    public void setCssStyle(String cssStyle) {
//        this.cssStyle = cssStyle;
//    }
}
